<template>
  <div class="dashboard">
    <btc v-if="subCoinType === 'btc'"/>
    <bch v-else-if="subCoinType === 'bch' || subCoinType === 'bsv'"/>
    <innovate v-else/>
  </div>
</template>
<script>
import { mapGetters } from 'vuex';
import btc from './components/btc';
import bch from './components/bch';
import innovate from './components/innovate';

export default {
  name: 'dashboard',
  components: {
    btc,
    bch,
    innovate,
  },
  computed: {
    ...mapGetters(['subCoinType']),
  },
};
</script>
<style lang="scss" scoped>
.dashboard /deep/ {
  height: 100%;
  .h100{
    height: 100%;
  }
  button {
    outline: none;
    border: none;
  }
  .no-full {
    @mixin panelBorder {
      background-color: #ffffff;
      box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
      border: solid 1px #e0e0e0;
      overflow: hidden;
    }
    small.header-next {
      background-color: rgba(0, 0, 0, 0.7);
      height: 30px;
      line-height: 30px;
      color: #f3ffbd;
      display: block;
      font-size: 12px;
      text-align: center;
      opacity: 1;
      &.fade-enter-active,
      .fade-leave-active {
        transition: all 0.5s;
      }
      &.fade-enter,
      &.fade-leave-to {
        opacity: 0;
        height: 0;
      }
      .p-span {
        color: #247ba0;
      }
      .icon {
        font-weight: bold;
        margin-right: 10px;
      }
    }
    .dashboard-title {
      .full-btn {
        margin-top: 20px;
        width: 90px;
        height: 30px;
        background-color: #70c1b3;
        border-radius: 3px;
        font-size: 12px;
        color: #fff;
        &:hover {
          background-color: #8dcdc2;
        }
      }
    }
    .panel-top,
    .panel-item,
    .panel-bottom {
      .item-title {
        height: 50px;
        padding: 13px 20px;
        background-color: #f9f9f9;
        box-shadow: inset 0px -1px 0px 0px #f2f2f2;
        font-size: 12px;
        line-height: 24px;
        .name {
          color: #333333;
        }
        .link {
          color: #247ba0;
        }
        .button-box {
          display: flex;
          width: 110px;
          height: 24px;
          background-color: #ffffff;
          border-radius: 4px;
          border: solid 1px #cccccc;
          overflow: hidden;
          button {
            flex: 1;
            border-right: 1px solid #cccccc;
            background-color: #f4f4f4;
            color: #646464;
            &:last-of-type {
              border-right: none;
            }
            &.active {
              background-color: #fff;
            }
            &:disabled {
              cursor: not-allowed;
            }
          }
        }
      }
    }
    .panel-top {
      @include panelBorder;
      .item-content {
        display: flex;
        .item {
          flex: 1;
          height: 120px;
          text-align: center;
          position: relative;
          padding: 25px 0 0;
          line-height: 1.5;
          .item-top {
            color: #333333;
            height: 45px;
            line-height: 45px;
            .val {
              font-size: 30px;
            }
            .unit {
              font-size: 18px;
            }
          }
          .item-bottom {
            .name {
              color: #cccccc;
              font-size: 18px;
            }
          }
        }
      }
    }
    .panel-item {
      margin-top: 30px;
      .item {
        @include panelBorder;
        border-radius: 5px;
        height: 370px;
        display: flex;
        flex-direction: column;
        &:nth-of-type(1) {
          width: 380px;
          .item-content {
            padding: 20px 40px;
          }
        }
        &:nth-of-type(2) {
          width: 750px;
        }
        .item-content {
          flex: 1;
          .noData {
            text-align: center;
            p {
              color: #333333;
              font-size: 18px;
              margin-top: 105px;
            }
            a {
              min-width: 90px;
              padding: 0 5px;
              height: 30px;
              line-height: 30px;
              background-color: #70c1b3;
              border-radius: 3px;
              color: #fff;
              font-size: 12px;
              display: inline-block;
              margin-top: 35px;
            }
          }
          .dashboard-echarts {
            width: 748px;
            height: 318px;
          }
          .item-table {
            width: 100%;
            border-collapse: collapse;
            tr {
              padding: 0;
              margin: 0;
              td {
                .td-cell {
                  text-align: right;
                }
              }
              td,
              th {
                padding: 0;
                margin: 0;
                border: none;
                .td-cell {
                  white-space: nowrap;
                  padding: 17px 0;
                  height: 70px;
                  line-height: 36px;
                  font-size: 16px;
                  color: #333333;
                  &.input-td-cell {
                    padding: 14px 0;
                  }
                  .setting {
                    color: #247ba0;
                    background: #fff;
                  }
                  .val {
                    font-size: 24px;
                  }
                  .unit {
                    font-size: 14px;
                  }
                  .input-box {
                    background-color: #ffffff;
                    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
                    border: solid 1px #e0e0e0;
                    padding: 10px;
                    height: 50px;
                    font-size: 0;
                    .input-box_input {
                      width: 140px;
                      height: 30px;
                      border: none;
                      font-size: 16px;
                      outline: none;
                      &.kuangji_input {
                        width: 180px;
                      }
                      &:disabled {
                        cursor: not-allowed;
                      }
                    }
                    button {
                      width: 60px;
                      height: 30px;
                      background-color: #70c1b3;
                      border-radius: 5px;
                      color: #ffffff;
                      font-size: 16px;
                      &:disabled {
                        cursor: not-allowed;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    .panel-bottom {
      margin-top: 30px;
      .item {
        @include panelBorder;
        border-radius: 5px;
        height: 420px;
        width: 565px;
        .item-content {
          color: #333333;
          font-size: 16px;
          line-height: 24px;
          padding: 10px 20px 18px;
          .item-table {
            width: 100%;
            tr {
              padding: 0;
              margin: 0;
              td,
              th {
                padding: 0;
                margin: 0;
                border: none;
              }
              th {
                .td-cell {
                  font-weight: 600;
                  font-size: 18px;
                  line-height: 28px;
                  text-align: center;
                  padding: 7px 0;
                  height: 42px;
                }
              }
              td {
                .td-cell {
                  white-space: nowrap;
                  height: 50px;
                  padding: 13px 20px;
                  text-align: center;
                  a {
                    color: #247ba0;
                  }
                }
              }
            }
          }
        }
      }
    }
    .dashboard-select{
      width: 60px;
      height: 30px;
      line-height: 30px!important;
      .el-input__inner{
        height: 30px!important;
        padding-left: 10px;
      }
      .el-input__suffix{
        right: 1px;
        top: 1px;
        height: 28px;
        line-height: 28px;
        background-color: #f9f9f9;
        border-left: solid 1px #e0e0e0;
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
        .el-input__icon{
          width: 29px;
          line-height: 28px;
          &.el-icon-arrow-up:before{
            content: "\e6e9";
            font-family:"iconfont" !important;
            font-size: 12px;
            color: #70c1b3;
            font-style:normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
          }
        }
      }
    }
  }
  .full {
    height: 100%;
    background-color: #1c1c1c;
    color: #c0a465;
    .full-header {
      font-size: 0.09375rem;
      height: 0.15625rem;
      background-color: #333333;
      text-align: center;
      & > a {
        color: #c0a465;
        display: inline-block;
        height: 100%;
        &.change_account {
          position: relative;
        }
      }
    }
    .full-content {
      padding: 0 0.15625rem;
      .panel-item {
        margin-top: 0.15625rem;
        display: flex;
        justify-content: space-between;
        .item {
          background-color: #333333;
          height: 2.5rem;
          border-radius: 0.026042rem;
          display: flex;
          flex-direction: column;
          &:nth-of-type(1) {
            width: 1.979167rem;
            .item-title {
              padding-right: 0.125rem;
            }
          }
          &:nth-of-type(2) {
            width: 4.453125rem;
            .item-title {
              padding-right: 0.078125rem;
            }
          }
          &:nth-of-type(3) {
            width: 2.942708rem;
            .item-content {
              color: #333333;
              font-size: 0.083333rem;
              line-height: 0.125rem;
              padding: 0 0.104167rem 0.052083rem;
              .item-table {
                width: 100%;
                tr {
                  padding: 0;
                  margin: 0;
                  td,
                  th {
                    padding: 0;
                    margin: 0;
                    // border: red 1px solid;
                  }
                  th {
                    .td-cell {
                      font-weight: 600;
                      text-align: center;
                      padding: 0.135417rem 0;
                      height: 0.395833rem;
                    }
                  }
                  td {
                    .td-cell {
                      height: 0.255208rem;
                      padding: 0.065104rem 0.104167rem;
                      text-align: center;
                      a {
                        color: #247ba0;
                      }
                    }
                  }
                }
              }
            }
          }
          .item-title {
            height: 0.260417rem;
            padding: 0.067708rem 0.104167rem;
            font-size: 0.0625rem;
            line-height: 0.125rem;
            .name {
              color: #c0a465;
            }
            .link {
              color: #247ba0;
            }
            .button-box {
              display: flex;
              width: 0.572917rem;
              height: 0.125rem;
              background-color: #a68e58;
              border-radius: 0.020833rem;
              border: solid 1px #8c784a;
              overflow: hidden;
              button {
                flex: 1;
                border-right: 1px solid #8c784a;
                background-color: #a68e58;
                color: #594d2f;
                line-height: 0.114583rem;
                &:last-of-type {
                  border-right: none;
                }
                &.active {
                  background-color: #c0a465;
                }
              }
            }
          }
          .item-content {
            flex: 1;
            .noData {
              text-align: center;
              p {
                font-size: 0.09375rem;
                margin-top: 0.546875rem;
              }
              a {
                min-width: 0.46875rem;
                padding: 0 0.026041rem;
                height: 0.15625rem;
                line-height: 0.15625rem;
                background-color: #c0a465;
                border-radius: 0.015625rem;
                color: #594d2f;
                font-size: 0.0625rem;
                display: inline-block;
                margin-top: 0.182292rem;
              }
            }
            .item-table {
              width: 100%;
              border-collapse: collapse;
              &.suanli-table,
              &.kuangji-table {
                tr {
                  td {
                    &:nth-child(2) {
                      .td-cell {
                        padding-right: 0;
                        padding-left: 0;
                      }
                    }
                  }
                }
              }
              &.suanli-table {
                tr {
                  th {
                    width: 54.6%;
                  }
                }
              }
              &.kuangji-table {
                tr {
                  th {
                    width: 56%;
                  }
                }
              }
              tr {
                padding: 0;
                margin: 0;
                td,
                th {
                  padding: 0;
                  margin: 0;
                  border: none;
                  .td-cell {
                    white-space: nowrap;
                    padding: 0.186198rem 0.208333rem;
                    height: 0.559896rem;
                    line-height: 0.1875rem;
                    font-size: 0.083333rem;
                    color: #c0a465;
                    &.input-td-cell {
                      padding: 0.14974rem 0.208333rem;
                    }
                    .setting {
                      color: #247ba0;
                      background-color: #333333;
                    }
                    .val {
                      font-size: 0.125rem;
                    }
                    .unit {
                      font-size: 0.072917rem;
                    }
                    .input-box {
                      background-color: #ffffff;
                      padding: 0.052083rem;
                      height: 0.260417rem;
                      font-size: 0;
                      .input-box_input {
                        width: 0.729167rem;
                        height: 0.15625rem;
                        border: none;
                        font-size: 0.083333rem;
                        outline: none;
                        &.kuangji_input {
                          width: 0.9375rem;
                        }
                        &:disabled {
                          cursor: not-allowed;
                        }
                      }
                      button {
                        width: 0.3125rem;
                        height: 0.15625rem;
                        background-color: #c0a465;
                        border-radius: 0.026042rem;
                        color: #594d2f;
                        font-size: 0.083333rem;
                        &:disabled {
                          cursor: not-allowed;
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    .dashboard-select{
      width: .3125rem;
      height: .15625rem;
      line-height: .15625rem!important;
      .el-input__inner{
        height: .15625rem!important;
        padding-left: .052083rem;
        padding-right: .15625rem;
        font-size: .083333rem;
      }
      .el-input__suffix{
        right: .005208rem;
        top: .005208rem;
        height: .145833rem;
        line-height: .145833rem;
        background-color: #c0a465;
        border-left: solid .005208rem #c0a465;
        border-top-right-radius: .020833rem;
        border-bottom-right-radius: .020833rem;
        .el-input__icon{
          width: .151042rem;
          line-height: .145833rem;
          &.el-icon-arrow-up:before{
            content: "\e6e9";
            font-family:"iconfont" !important;
            font-size: .0625rem;
            color: #594d2f;
            font-style:normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
          }
        }
      }
    }
    .el-loading-mask{
      .el-loading-spinner{
        .path{
          stroke: #c0a465;
        }
        .el-loading-text{
          color: #c0a465;
        }
      }
    }
  }
}
</style>
